package com.grass.p019lv.databinding;

import android.util.SparseIntArray;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.databinding.DataBindingComponent;
import androidx.databinding.ViewDataBinding;
import androidx.databinding.adapters.TextViewBindingAdapter;
import com.androidx.p013lv.base.bean.VideoBean;
import com.grass.p019lv.activity.VideoPlayActivity;
import com.grass.p019lv.generated.callback.OnClickListener;

/* renamed from: com.grass.lv.databinding.VideoBtnLeaseBuyViewBindingImpl */
public class VideoBtnLeaseBuyViewBindingImpl extends VideoBtnLeaseBuyViewBinding implements OnClickListener.Listener {
    private static final ViewDataBinding.IncludedLayouts sIncludes = null;
    private static final SparseIntArray sViewsWithIds = null;
    private final View.OnClickListener mCallback48;
    private final View.OnClickListener mCallback49;
    private long mDirtyFlags;
    private final RelativeLayout mboundView0;
    private final LinearLayout mboundView1;
    private final TextView mboundView2;
    private final LinearLayout mboundView3;
    private final TextView mboundView4;

    public VideoBtnLeaseBuyViewBindingImpl(DataBindingComponent dataBindingComponent, View view) {
        this(dataBindingComponent, view, mapBindings(dataBindingComponent, view, 5, sIncludes, sViewsWithIds));
    }

    private VideoBtnLeaseBuyViewBindingImpl(DataBindingComponent dataBindingComponent, View view, Object[] objArr) {
        super(dataBindingComponent, view, 1);
        this.mDirtyFlags = -1;
        RelativeLayout relativeLayout = (RelativeLayout) objArr[0];
        this.mboundView0 = relativeLayout;
        relativeLayout.setTag(null);
        LinearLayout linearLayout = (LinearLayout) objArr[1];
        this.mboundView1 = linearLayout;
        linearLayout.setTag(null);
        TextView textView = (TextView) objArr[2];
        this.mboundView2 = textView;
        textView.setTag(null);
        LinearLayout linearLayout2 = (LinearLayout) objArr[3];
        this.mboundView3 = linearLayout2;
        linearLayout2.setTag(null);
        TextView textView2 = (TextView) objArr[4];
        this.mboundView4 = textView2;
        textView2.setTag(null);
        setRootTag(view);
        this.mCallback49 = new OnClickListener(this, 2);
        this.mCallback48 = new OnClickListener(this, 1);
        invalidateAll();
    }

    @Override // androidx.databinding.ViewDataBinding
    public void invalidateAll() {
        synchronized (this) {
            this.mDirtyFlags = 128;
        }
        requestRebind();
    }

    @Override // androidx.databinding.ViewDataBinding
    public boolean hasPendingBindings() {
        synchronized (this) {
            if (this.mDirtyFlags != 0) {
                return true;
            }
            return false;
        }
    }

    @Override // androidx.databinding.ViewDataBinding
    public boolean setVariable(int i, Object obj) {
        if (170 == i) {
            setStatus((Integer) obj);
        } else if (196 == i) {
            setVideoBean((VideoBean) obj);
        } else if (34 != i) {
            return false;
        } else {
            setClick((VideoPlayActivity.OnClick) obj);
        }
        return true;
    }

    @Override // com.grass.p019lv.databinding.VideoBtnLeaseBuyViewBinding
    public void setStatus(Integer num) {
        this.mStatus = num;
        synchronized (this) {
            this.mDirtyFlags |= 2;
        }
        notifyPropertyChanged(170);
        super.requestRebind();
    }

    @Override // com.grass.p019lv.databinding.VideoBtnLeaseBuyViewBinding
    public void setVideoBean(VideoBean videoBean) {
        updateRegistration(0, videoBean);
        this.mVideoBean = videoBean;
        synchronized (this) {
            this.mDirtyFlags |= 1;
        }
        notifyPropertyChanged(196);
        super.requestRebind();
    }

    @Override // com.grass.p019lv.databinding.VideoBtnLeaseBuyViewBinding
    public void setClick(VideoPlayActivity.OnClick onClick) {
        this.mClick = onClick;
        synchronized (this) {
            this.mDirtyFlags |= 4;
        }
        notifyPropertyChanged(34);
        super.requestRebind();
    }

    /* access modifiers changed from: protected */
    @Override // androidx.databinding.ViewDataBinding
    public boolean onFieldChange(int i, Object obj, int i2) {
        if (i != 0) {
            return false;
        }
        return onChangeVideoBean((VideoBean) obj, i2);
    }

    private boolean onChangeVideoBean(VideoBean videoBean, int i) {
        if (i == 0) {
            synchronized (this) {
                this.mDirtyFlags |= 1;
            }
            return true;
        } else if (i == 199) {
            synchronized (this) {
                this.mDirtyFlags |= 8;
            }
            return true;
        } else if (i == 25) {
            synchronized (this) {
                this.mDirtyFlags |= 16;
            }
            return true;
        } else if (i == 103) {
            synchronized (this) {
                this.mDirtyFlags |= 32;
            }
            return true;
        } else if (i != 142) {
            return false;
        } else {
            synchronized (this) {
                this.mDirtyFlags |= 64;
            }
            return true;
        }
    }

    /* access modifiers changed from: protected */
    /* JADX WARNING: Removed duplicated region for block: B:65:0x00b9  */
    /* JADX WARNING: Removed duplicated region for block: B:67:0x00bf  */
    /* JADX WARNING: Removed duplicated region for block: B:70:0x00c5  */
    /* JADX WARNING: Removed duplicated region for block: B:72:0x00c9  */
    /* JADX WARNING: Removed duplicated region for block: B:75:0x00ce  */
    /* JADX WARNING: Removed duplicated region for block: B:78:0x00da  */
    /* JADX WARNING: Removed duplicated region for block: B:81:0x00ee  */
    /* JADX WARNING: Removed duplicated region for block: B:84:0x00f8  */
    /* JADX WARNING: Removed duplicated region for block: B:89:? A[RETURN, SYNTHETIC] */
    @Override // androidx.databinding.ViewDataBinding
    public void executeBindings() {
        long j;
        boolean z;
        String str;
        String str2;
        boolean z2;
        int i;
        long j2;
        boolean z3;
        int i2;
        synchronized (this) {
            j = this.mDirtyFlags;
            this.mDirtyFlags = 0;
        }
        Integer num = this.mStatus;
        VideoBean videoBean = this.mVideoBean;
        VideoPlayActivity.OnClick onClick = this.mClick;
        long j3 = j & 155;
        if (j3 != 0) {
            z = ViewDataBinding.safeUnbox(num) == 0;
            if (j3 != 0) {
                j = z ? j | 512 : j | 256;
            }
        } else {
            z = false;
        }
        String str3 = null;
        if ((225 & j) != 0) {
            if ((j & 161) != 0) {
                str2 = String.valueOf(videoBean != null ? videoBean.getLeasePrice() : 0);
            } else {
                str2 = null;
            }
            if ((j & 193) != 0) {
                str3 = String.valueOf(videoBean != null ? videoBean.getPrice() : 0);
            }
            str = str3;
        } else {
            str2 = null;
            str = null;
        }
        long j4 = j & 512;
        if (j4 != 0) {
            if (videoBean != null) {
                i2 = videoBean.getVideoType();
            } else {
                i2 = 0;
            }
            z2 = i2 == 2;
            if (j4 != 0) {
                j = z2 ? j | 8192 : j | 4096;
            }
        } else {
            z2 = false;
        }
        long j5 = j & 8192;
        int i3 = 8;
        if (j5 != 0) {
            if (videoBean != null) {
                z3 = videoBean.isCanWatch();
            } else {
                z3 = false;
            }
            if (j5 != 0) {
                j |= z3 ? 2048 : 1024;
            }
            if (z3) {
                i = 8;
                if ((512 & j) != 0) {
                    i = 0;
                } else if (!z2) {
                    i = 8;
                }
                j2 = 155 & j;
                if (j2 != 0) {
                    i3 = 0;
                } else if (z) {
                    i3 = i;
                }
                if (j2 != 0) {
                    this.mboundView0.setVisibility(i3);
                }
                if ((128 & j) != 0) {
                    this.mboundView1.setOnClickListener(this.mCallback48);
                    this.mboundView3.setOnClickListener(this.mCallback49);
                }
                if ((j & 161) != 0) {
                    TextViewBindingAdapter.setText(this.mboundView2, str2);
                }
                if ((j & 193) == 0) {
                    TextViewBindingAdapter.setText(this.mboundView4, str);
                    return;
                }
                return;
            }
        }
        i = 0;
        if ((512 & j) != 0) {
        }
        j2 = 155 & j;
        if (j2 != 0) {
        }
        if (j2 != 0) {
        }
        if ((128 & j) != 0) {
        }
        if ((j & 161) != 0) {
        }
        if ((j & 193) == 0) {
        }
    }

    @Override // com.grass.p019lv.generated.callback.OnClickListener.Listener
    public final void _internalCallbackOnClick(int i, View view) {
        boolean z = false;
        if (i == 1) {
            VideoPlayActivity.OnClick onClick = this.mClick;
            if (onClick != null) {
                z = true;
            }
            if (z) {
                onClick.leaseVideo();
            }
        } else if (i == 2) {
            VideoPlayActivity.OnClick onClick2 = this.mClick;
            if (onClick2 != null) {
                z = true;
            }
            if (z) {
                onClick2.buyVideo();
            }
        }
    }
}
